#ifndef GMKeyChangeDirectInput_h__
#define GMKeyChangeDirectInput_h__

#include "GameMessage.h"
#include "KeyState.h"

class GMKeyChangeDirectInput: public GameMessage
{
public:
    GMKeyChangeDirectInput() : m_state(KeyState_Released), m_key(0), m_pressed(false), m_clientID(-1) {}
    virtual void WriteToSckMsg( Networking::SockMsg* sm );
    virtual bool Execute();
    virtual bool ReadFromSckMsg(Networking::SockMsg* sm );
    virtual const char* GetTypeName() const;
    void SetKey(int key, bool pressed, KeyState state){m_key = key; m_pressed = pressed; m_state = state;}
    void SetClientID(int id){m_clientID = id;}

public:
    static const char* NAME;
    bool m_pressed;
    int m_key;
    int m_clientID;
    KeyState m_state;
};

#endif // GMKeyChangeDirectInput_h__